﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/AdminSite.Master" Inherits="System.Web.Mvc.ViewPage<IPagedList<MensUnoShop.Models.OrderData>>" %>
<%@ Import Namespace="MvcPaging"%>  
<%@ Import Namespace="MensUnoShop.Helpers" %>
<%@ Import Namespace="MensUnoShop.Areas.Admin.Helpers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	OrderShipBatchDetail
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="main-content" class="hastable">
    <div class="title title-spacing">
	    <h2>已出貨清單明細</h2>
			
    </div>
     
     <input type="button" value="回上一頁" class="submit" onclick="javascript:location.href='/Admin/OrderManagement/OrderListShip'" />
     <input type="button" value="列印出貨表單" onclick="javascript:window.open('/Admin/OrderManagement/OrderShipPaper/<%:ViewData["batchid"] %>','_blank');" />
     <ul class="pagination">
        <%= Html.UPager(Model.PageSize, Model.PageNumber, Model.TotalItemCount)%>
     </ul>
     <table cellspacing="0" style="width:2500px">
        <thead>
 	    <tr>               
                <td style="width:100px">批次編號</td>           
                <td style="width:100px"><span><a href="/Admin/OrderManagement/OrderShipBatchDetail/<%:ViewData["batchid"] %>?sortindex=txid&sorttype=<%:ViewData["sorttype"] %>">訂單編號</a></span></td>
                <td style="width:100px"><span><a href="/Admin/OrderManagement/OrderShipBatchDetail/<%:ViewData["batchid"] %>?sortindex=cashid&sorttype=<%:ViewData["sorttype"] %>">金流編號</a></span></td>
                <td style="width:100px"><span><a href="/Admin/OrderManagement/OrderShipBatchDetail/<%:ViewData["batchid"] %>?sortindex=orderdate&sorttype=<%:ViewData["sorttype"] %>">訂單時間</a></span></td>
                <td style="width:100px"><span><a href="/Admin/OrderManagement/OrderShipBatchDetail/<%:ViewData["batchid"] %>?sortindex=statusdate&sorttype=<%:ViewData["sorttype"] %>">入帳時間</a></span></td>
                <td >付款方式</td>
                <td >會員帳號</td>
                <td >會員姓名</td>
                <td >產品編號</td>
                <td >品名</td>                
                <td >顏色</td>
                <td >尺寸</td>
                <td >數量</td>
                <td >商品價格</td>
                <td >運送方法</td>
                <td >運費</td>
                <td >客戶意見欄</td>
                <td >收件人姓名</td>
                <td >收件人電話</td>
                <td >收件人地址</td>
                <%--<td >發票類型</td>
                <td >發票抬頭</td>
                <td >發票統編</td>--%>                
                <td >出貨單編號</td>
                <td ></td>
                <td ></td>
                <td ></td>
            </tr>            
        </thead>        
     <%if (Model != null)
            {%>           
        <tbody>
            <%foreach (var item in Model)
            {  %>
        	<tr id="tr_<%:item.OGUID %>" name="tr_<%:item.OGUID %>">                            
                <td><%:item.OBBATCHID %></td>
                <td><%:item.OTXID %></td>
                <td><%:item.OCASHID %></td>
                <td><%:item.ORDERDATE %></td>
                <td><%:item.ORDERPAYDATE%></td>
                <td><%=Html.GetPayType(item.PAYTYPE)%></td>
                <td><%:item.MEMAIL %></td>
                <td><%:item.MNAME %></td>
                <td><%:item.MOKSN %></td>
                <td><%:item.MOKTITLE %></td>                
                <td><%:item.COLOR %></td>
                <td><%:item.SPEC %></td>
                <td><%:item.MOKAMOUNT %></td>
                <td><%:item.MOKPRICE %></td>
                <td><%=Html.GetShippingWay(item.OSHIPPINGWAY)%></td>
                <td><%:item.ODELIVERY%></td>
                <td><%:item.RCCUSTOMER %></td>
                <td><%:item.RCNAME %></td>
                <td><%:item.RCTEL %></td>
                <td><%:item.RCCOUNTRY %><%:item.RCZIP %><%:item.RCCITY %><%:item.RCAREA %><%:item.RCADDRESS %></td>
                <%--<td><%=Html.GetInvoiceType(item.OINVOICETYPE)%></td>
                <td><%:item.OINVOICETITLE %></td>
                <td><%:item.OINVOICESERIAL %></td>--%>                
                <td><%:item.OSHIPPINGNUM %></td>
                <td><a id="OrderShippingnumChange" name="OrderShippingnumChange" href="../OrderShippingnumChange/<%:item.OGUID %>">編輯出貨單號</a></td>
                <td><a id="OrderDetail" name="OrderDetail" class="iframe" href="../OrderDetailView/<%:item.OGUID %>">訂單明細</a></td>
                <td><a id="MemberDetail" name="MemberDetail" class="iframe" href="/Admin/MemberManagement/MemberDetailView/<%:item.MGUID %>">會員資料</a></td>                
            </tr>
            <%} %>
        </tbody>
        <%} %>
     </table>
    <ul class="pagination" style="margin-top:-60px;">
        <%= Html.UPager(Model.PageSize, Model.PageNumber, Model.TotalItemCount)%>
    </ul>
     <br/><br/>　
 </div>

<script type="text/javascript">
    $("a#OrderDetail").fancybox({ width: 810 });
    $("a#MemberDetail").fancybox({ height: 400, scrolling: 'no' });
</script>
</asp:Content>
